package com.pragmatic.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import lombok.experimental.FieldDefaults;

@Getter
@Setter
@ToString
@Accessors(chain = true)
@FieldDefaults(level = AccessLevel.PRIVATE)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class CommonRequest<T> {

  /** 请求类型 - 接收端通过策略模式做请求转发 */
  private String requestUrl;

  /** 业务参数 */
  T payload;

  // 定义构造器
  public CommonRequest(String requestUrl) {
    this.requestUrl = requestUrl;
  }
}
